python remove string from string

33

s = 'abc12321cba'

print(s.replace('a', ''))
import re
print(re.sub("e|l", "", "Hello people"))
"Ho pop"
s = 'ab12abc34ba'
print(s.replace('ab', ''))

Comments

Submit
0 Comments